package com.zzyl.serve.service.impl;

import java.util.List;
import com.zzyl.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zzyl.serve.mapper.NursingProWechatMapper;
import com.zzyl.serve.domain.NursingProWechat;
import com.zzyl.serve.service.INursingProWechatService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.Arrays;

/**
 * 护理项目Service业务层处理
 * 
 * @author yanbucai
 * @date 2025-05-08
 */
@Service
public class NursingProWechatServiceImpl extends ServiceImpl<NursingProWechatMapper, NursingProWechat> implements INursingProWechatService
{
    @Autowired
    private NursingProWechatMapper nursingProWechatMapper;

    /**
     * 查询护理项目
     * 
     * @param id 护理项目主键
     * @return 护理项目
     */
    @Override
    public NursingProWechat selectNursingProWechatById(Long id)
    {
        return getById(id);
    }

    /**
     * 查询护理项目列表
     * 
     * @param nursingProWechat 护理项目
     * @return 护理项目
     */
    @Override
    public List<NursingProWechat> selectNursingProWechatList(NursingProWechat nursingProWechat)
    {
        return nursingProWechatMapper.selectNursingProWechatList(nursingProWechat);
    }

    /**
     * 新增护理项目
     * 
     * @param nursingProWechat 护理项目
     * @return 结果
     */
    @Override
    public int insertNursingProWechat(NursingProWechat nursingProWechat)
    {
        return save(nursingProWechat) ? 1 : 0;
    }

    /**
     * 修改护理项目
     * 
     * @param nursingProWechat 护理项目
     * @return 结果
     */
    @Override
    public int updateNursingProWechat(NursingProWechat nursingProWechat)
    {
        return updateById(nursingProWechat) ? 1 : 0;
    }

    /**
     * 批量删除护理项目
     * 
     * @param ids 需要删除的护理项目主键
     * @return 结果
     */
    @Override
    public int deleteNursingProWechatByIds(Long[] ids)
    {
        return removeByIds(Arrays.asList(ids)) ? 1 : 0;
    }

    /**
     * 删除护理项目信息
     * 
     * @param id 护理项目主键
     * @return 结果
     */
    @Override
    public int deleteNursingProWechatById(Long id)
    {
        return removeById(id) ? 1 : 0;
    }
}
